package com.tancire.web.controller.app;

import com.tancire.common.core.controller.BaseController;
import com.tancire.common.core.domain.AjaxResult;
import com.tancire.message.domain.MsgMessage;
import com.tancire.message.service.IMsgMessageService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 消息管理Controller
 *
 * @author tancire
 * @date 2024-03-15
 */
@RestController
@RequestMapping("/net/app/message/member")
public class UserMessageAppController extends BaseController {
    @Resource
    private IMsgMessageService msgMessageService;

    /**
     * 查询消息管理列表
     */
    @PreAuthorize("@ss.hasPermi('net:user:union')")
    @GetMapping("/list")
    public AjaxResult list(MsgMessage msgMessage) {
        List<MsgMessage> list = msgMessageService.getUserMessage(msgMessage);
        return AjaxResult.success(list);
    }

}
